import React, { useEffect } from 'react'
import { observer, useLocalStore } from 'mobx-react'
import { observable, action } from 'mobx'
import Style from './style.module.less'

let appState = observable({
	count: 0
})
export default observer(function index() {
	console.log('this', appState, appState.count,)
	const tick = action(() => {
		console.log('点击了一下')
		console.log('appState.count', appState.count)
		appState.count++
		console.log('appState.count', appState.count)
	})

	useEffect(() => {

	}, [appState.count])
	return (
		<>
			<h2>{appState.count}</h2>
			<div className={Style.buttonDiv} onClick={tick}>点击一下</div>
		</>

	)
})
